home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / dviselect / gfclass.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-16  |  1.7 KB  |  58 lines

  1. /*
  2.  * Copyright (c) 1987 University of Maryland Department of Computer Science.
  3.  * All rights reserved.  Permission to copy for any purpose is hereby granted
  4.  * so long as this copyright notice remains intact.
  5.  */
  6.  
  7. /*
  8.  * GF classification codes
  9.  */
  10.  
  11. /*
  12.  * Predicate for simple paint commands.  This is presumably the most
  13.  * common GF operation; it may be profitable to check for this before
  14.  * switching out on the command type.
  15.  */
  16. #define    GF_IsPaint(c)    ((c) < 64)
  17.  
  18. /*
  19.  * Symbolic names for command `types', as returned by the macro
  20.  * GT_TYPE(int c).
  21.  */
  22. #define GT_PAINT0    0    /* paint without parameter */
  23. #define    GT_PAINT    1    /* paint with parameter */
  24. #define GT_BOC        2    /* long BOC */
  25. #define    GT_BOC1        3    /* short BOC */
  26. #define GT_EOC        4    /* EOC */
  27. #define GT_SKIP0    5    /* parameterless SKIP */
  28. #define    GT_SKIP        6    /* parmeterised SKIP */
  29. #define GT_NEW_ROW    7    /* NEW_ROW_n */
  30. #define GT_XXX        8    /* XXXn */
  31. #define GT_YYY        9    /* YYY */
  32. #define    GT_NOP        10    /* no op */
  33. #define GT_CHAR_LOC    11    /* CHAR_LOC */
  34. #define    GT_CHAR_LOC0    12    /* abbreviated CHAR_LOC */
  35. #define    GT_PRE        13
  36. #define    GT_POST        14
  37. #define    GT_POSTPOST    15
  38. #define    GT_UNDEF    16
  39.  
  40. /*
  41.  * Symbolic names for parameter lengths, obtained via the macro
  42.  * GT_OpLen(int c).
  43.  */
  44. #define    GPL_NONE    0    /* no parameter, or too complex */
  45. #define    GPL_UNS1    1    /* one one-byte parameter in 0..255 */
  46. #define    GPL_UNS2    2    /* one two-byte parameter in 0..65535 */
  47. #define    GPL_UNS3    3    /* one three-byte parameter in 0..16777215 */
  48. #define    GPL_SGN4    4    /* one four-byte signed parameter */
  49. /*
  50.  * there are no unsigned four byte parameters, and no shorter signed
  51.  * parameters
  52.  */
  53.  
  54. #define GF_OpLen(code)    (gf_oplen[code])
  55. #define GF_TYPE(code)    (gf_gt[code])
  56. extern char gf_oplen[];
  57. extern char gf_gt[];
  58.